/*
 * formulario.cpp
 *
 *  Created on: 08/12/2008
 *      Author: desadoc
 */

#include "formulario.h"

void formulario::setFields(QList<QString>& questions){

	int i;

	QVBoxLayout *main;
	QHBoxLayout *line;

	QWidget *lineW;
	QLabel *label;
	QLineEdit *answer;

	main = new QVBoxLayout;

	for(i=0; i<questions.size(); i++){
		lineW = new QWidget;
		line = new QHBoxLayout;

		label = new QLabel(questions.at(i));
		label->setFixedWidth(200);

		answer = new QLineEdit;

		line->addWidget(label);
		line->addWidget(answer);

		lineW->setLayout(line);

		main->addWidget(lineW);
	}

	setLayout(main);

}
